<?php

namespace app\api\model\mine;

use app\api\controller\User;
use app\api\model\BaseModel;

class UsdtLogModel extends BaseModel
{
    protected $name = 'usdt_log';

    public const  TYPE_RECHARGE = 200; //充值
    public const  TYPE_ZERO = 100; // 余额清零

    public function createLog($user_id, $address, $balance, $after, $type, $be = 1): bool
    {
        $this->save([
            'user_id' => $user_id,
            'address' => $address,
            'money' => $balance,
            'after' => $after,
            'type' => $type,
            'be' => $be
        ]);

        return true;
    }
}